package pl.maciejziarko.mshare.dto.converters;

import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.springframework.stereotype.Component;
import pl.maciejziarko.mshare.dto.LoginDTO;

/**
 * @author Maciej Ziarko
 */
@Component
public final class LoginDTOConverter {

    public AuthenticationToken convert(LoginDTO DTOObject) {
        return new UsernamePasswordToken(DTOObject.getUsername(), DTOObject.getPassword());
    }

}
